package cn.xmy.demo01.service.impl;

import cn.xmy.demo01.dao.ShopInfoDao;
import cn.xmy.demo01.pojo.ShopInfo;
import cn.xmy.demo01.service.ShopInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.List;
@Service
public class ShopInfoServiceImpl implements ShopInfoService {
    @Autowired
   ShopInfoDao shopInfoDao;
    @Override
    public List<ShopInfo> findAllShops() throws SQLException, ClassNotFoundException {
        return shopInfoDao.findAllShops();
    }

    @Override
    public int deleteShopInfo(String id) throws SQLException, ClassNotFoundException {
        return shopInfoDao.deleteShopInfo(id);
    }

    @Override
    public double getPriceById(String id) {
        return shopInfoDao.getPriceById(id);
    }

    @Override
    public int updateShopQuantity(String id, int number, double result) {
        return shopInfoDao.updateShopQuantity(id, number, result);
    }


}
